﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ArraysAndStrings.FindMin
{
    class MainProject
    {
        static void Main(string[] args)
        {
            int[] nums = new int[] { 2, 1, -1 };
            Console.WriteLine(FindMin(nums));
            Console.ReadKey();
        }
        public static int FindMin(int[] nums)
        {
            int min = int.MaxValue;
            for (int i = 0; i < nums.Length; i++)
            {
                if (nums[i]< min)
                {
                    min = nums[i];
                }
            }
            return min;
        }
    }
}
